import 'package:flutter/material.dart';
import 'file:///E:/flutterWorkSpace/flutter_app_custom_chat/lib/chart/chart.dart';
import 'package:flutter_app_custom_chat/chart/chart_enum.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          SizedBox(
            height: 30,
          ),
          ChartView(
            height: 200,
            maxY: 100,
            data: [
              60,
              20,
              70,
              40,
              40,
              60,
              30,
              10,
              90,
              80,
              60,
              20,
              70,
              40,
              40,
              60,
              30,
              10,
              90,
              80,
              60,
              20,
              70,
              40,
              40,
              60,
              30,
              10,
              90,
              80,
            ],
          ),
          ChartView(
            e: ChartEnum.Histogram,
            height: 200,
            maxY: 100,
            data: [
              60,
              20,
              70,
              40,
              40,
              60,
              30,
              10,
              90,
              80,
              60,
              20,
              70,
              40,
              40,
              60,
              30,
              10,
              90,
              80,
              60,
              20,
              70,
              40,
              40,
              60,
              30,
              10,
              90,
              80,
            ],
          ),
        ],
      ),
    );
  }
}
